import { WSClient } from "./WSClient";

export class RpcMgr{

    private static clientCache:Map<string,WSClient> = new Map()


    public static createClient(name:string,url:string){
        let client = this.clientCache.get(name)
        if(client){
            return client
        }
        client = new WSClient(url)
        this.clientCache.set(name,client)
        return client
    }

    public static getClient(name:string){
        return this.clientCache.get(name)
    }
}